<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>webview测试</title>
    <script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
    <script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>

</head>

<body>

    <button class="ttb" style="width: 200px;line-height: 50px;">点击跳转小程序</button>

</body>

</html>


<script>

    console.log(wx);

    document.addEventListener('UniAppJSBridgeReady', function() {
        document.querySelector('.ttb').addEventListener('click', function(evt) {
          alert('点击了')
          var target = evt.target;
          if (target.tagName === 'BUTTON') {
            uni.navigateTo({
                  url: '/pages/mine/policy/policyList'
                });
          }
        });
    })

    // function to(){
    //     alert('执行了')
    //     wx.miniProgram.navigateTo({
    //         url: '/pages/mine/policy/policyList', 
    //         success: function(){
    //             alert('成功了')
    //         }
    //     })

    // }

</script>